//
// Created by tang on 2022/10/24.
//

#ifndef LEARNOPENGL_BUFFER_HPP
#define LEARNOPENGL_BUFFER_HPP

#include "gl/gl_validation.hpp"

namespace GL
{
    SHARED_HANDLE(Buffer);

    class Buffer final {
    public:
        Buffer();
        ~Buffer();

        void Bind(GLenum target) const;
        void Data(GLenum target, GLsizei length, const void *data, GLenum usage);

        FACTORY_METHOD(Buffer);

    private:
        GLuint m_handle_;
    };
}

#endif//LEARNOPENGL_BUFFER_HPP
